#/usr/bin/python
#-*-<coding=UTF-8>-*-

"""
本例展示了Event.Skip()方法的使用;
"""

import wx

class Frame(wx.Frame):
    
    def __init__(self):
	wx.Frame.__init__(self,parent=None,id=-1,title="",pos=wx.DefaultPosition,size=wx.DefaultSize)
	self.panel = wx.Panel(self,-1)
	self.button = wx.Button(self.panel,-1,"Click Me",pos=(100,15))
	self.Bind(wx.EVT_BUTTON,self.OnButtonClick,self.button)
	self.button.Bind(wx.EVT_LEFT_DOWN,self.OnMouseDown)

    def OnButtonClick(self,event):
	self.panel.SetBackgroundColour("Green")
	self.panel.Refresh()

    def OnMouseDown(self,event):
	self.button.SetLabel("Again!")
	event.Skip()


if __name__ == "__main__":
    app = wx.PySimpleApp()
    frame = Frame()
    frame.Show()
    app.MainLoop()
